﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace C12_Ex03_Shaked_032675316_Itay_032511057
{
    public static class StringExtentionMethods
    {
        public static string SafeFileNameString(this string i_Path)
        {
            foreach (char character in Path.GetInvalidFileNameChars())
            {
                i_Path = i_Path.Replace(character.ToString(), string.Empty);
            }

            foreach (char character in Path.GetInvalidPathChars())
            {
                i_Path = i_Path.Replace(character.ToString(), string.Empty);
            }

            return i_Path;
        }
    }
}
